Optimal. Leaf size=58 \[ -\frac{\csc ^2(c+d x)}{2 a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac{\cot (c+d x) \csc (c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0970141, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.316, Rules used = {3872, 2706, 2606, 30, 2611, 3770} \[ -\frac{\csc ^2(c+d x)}{2 a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac{\cot (c+d x) \csc (c+d x)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3872
Rule 2706
Rule 2606
Rule 30
Rule 2611
Rule 3770
Rubi steps
\begin{align*} \int \frac{\csc (c+d x)}{a+a \sec (c+d x)} \, dx &=-\int \frac{\cot (c+d x)}{-a-a \cos (c+d x)} \, dx\\ &=-\frac{\int \cot ^2(c+d x) \csc (c+d x) \, dx}{a}+\frac{\int \cot (c+d x) \csc ^2(c+d x) \, dx}{a}\\ &=\frac{\cot (c+d x) \csc (c+d x)}{2 a d}+\frac{\int \csc (c+d x) \, dx}{2 a}-\frac{\operatorname{Subst}(\int x \, dx,x,\csc (c+d x))}{a d}\\ &=-\frac{\tanh ^{-1}(\cos (c+d x))}{2 a d}+\frac{\cot (c+d x) \csc (c+d x)}{2 a d}-\frac{\csc ^2(c+d x)}{2 a d}\\ \end{align*}
Mathematica [A] time = 0.0958943, size = 67, normalized size = 1.16 \[ -\frac{\sec (c+d x) \left (2 \cos ^2\left (\frac{1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )\right )+1\right )}{2 a d (\sec (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.051, size = 54, normalized size = 0.9 \begin{align*} -{\frac{1}{2\,da \left ( \cos \left ( dx+c \right ) +1 \right ) }}-{\frac{\ln \left ( \cos \left ( dx+c \right ) +1 \right ) }{4\,da}}+{\frac{\ln \left ( -1+\cos \left ( dx+c \right ) \right ) }{4\,da}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.00968, size = 63, normalized size = 1.09 \begin{align*} -\frac{\frac{\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac{\log \left (\cos \left (d x + c\right ) - 1\right )}{a} + \frac{2}{a \cos \left (d x + c\right ) + a}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.66203, size = 181, normalized size = 3.12 \begin{align*} -\frac{{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) -{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) + 2}{4 \,{\left (a d \cos \left (d x + c\right ) + a d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\csc{\left (c + d x \right )}}{\sec{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.32623, size = 76, normalized size = 1.31 \begin{align*} \frac{\frac{\log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac{\cos \left (d x + c\right ) - 1}{a{\left (\cos \left (d x + c\right ) + 1\right )}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]